import { defineStore } from 'pinia'

export const useThemeStore = defineStore('theme', {
  state: () => ({
    theme: 'light-theme'
  }),
  actions: {
    switchTheme() {
      this.theme = (this.theme === 'light-theme' ? 'dark-theme' : 'light-theme')
    },
    isLightTheme() {
      return this.theme === 'light-theme'
    },
    isDarkTheme() {
      return this.theme === 'dark-theme'
    }
  }
})